#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>
#define SWAP(num) (num = ((num&0x55555555)<<1)+((num&0xaaaaaaaa)>>1))
int main()
{
    int num = 10;          
    SWAP(num);
    printf("%d", num);  
    return 0;
}


//#include <stdio.h>
//#include <stddef.h>
//
//struct S
//{
//    int a;
//    char c;
//    double d;
//};
//
//#define OFFSETOF(st_type,mem_name)    (size_t)&(((st_type *)0)->mem_name)
//
//int main()
//{
//    printf("%d\n", offsetof(struct S, a));
//    printf("%d\n", offsetof(struct S, c));
//    printf("%d\n", offsetof(struct S, d));
//    return 0;
//}